-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement std::size and std::ssize for C-style arrays #57
base: master
Are you sure you want to change the base?
Conversation
LGTM, anyone else have objections to merging this? Alternatively it could live in cxxshim? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two style nitpicks, other than that this looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the second commit to be squashed into the first, other than that LGTM.
Don't hijack std:: in frigg |
i.e this could be changed to use the |
yeah, not sure what's preferred here. I wanted it to match the corresponding |
Either way, frigg should not clash with the standard, and more conservatively, the standard namespace. I recommend the GCC 13 route if you can afford using a compiler with potential regressions (and, again, finding and reporting such regressions is invaluable). |
oh, also, FTR: adding stuff to |
C++17 and C++20 defines template functions for deducing the size of C-style arrays. I've found this useful and the implementation is simple (pretty much identical to the implementation on cppreference).